home *** CD-ROM | disk | FTP | other *** search
/ Aminet 33 / Aminet 33 - October 1999.iso / Aminet / comm / misc / ITA1004Daemon.lha / ITA1004Daemon-Install / Install < prev    next >
Encoding:
Text File  |  1999-08-14  |  10.8 KB  |  360 lines

  1.  
  2. ; *****************************************
  3. ; *                                       *
  4. ; *  ITA1004Daemon-Installationsskript    *
  5. ; *                                       *
  6. ; *  $VER: 0.2 (14.08.99) by J.Reinert    *
  7. ; *                                       *
  8. ; *****************************************
  9.  
  10.  
  11. ; *************************************************************************
  12. ; Definition der globalen Konstanten
  13. ; *************************************************************************
  14.  
  15. (set #liesmichtext     "Lies_mich.TXT")       ; Schlusswort
  16. (set #aiconname        "ITA1004DaemonStart")  ; Name Autostart-Icon
  17. (set #aiconsource      "daemon.noinfo")       ; Quellname Autostart-Icon
  18. (set #aicondest        "SYS:WBStartup")       ; Ziel für Autostart-Icon
  19. (set #doksource        "Docs")                ; Anleitungen
  20. (set #developersource  "Entwickler")          ; Entwickler-Infos
  21. (set #progssource      "Programme")           ; Programme
  22.  
  23. ; *************************************************************************
  24. ; Definition der deutschen Texte
  25. ; *************************************************************************
  26.  
  27. (set #askprgdirmsg "Bitte wählen Sie die 'ITA1004Config'-Schublade aus.")
  28.  
  29. (set #askprgdirhelp
  30.   (cat "Es ist sehr wichtig, dass Sie die Schublade auswählen, in der "
  31.        "sich das konfigurierte Programm 'ITA1004Config' befindet. "
  32.        "ITA1004Daemon verwendet die selbe Prefs-Datei wie ITA1004Config.\n\n"
  33.        "Falls Sie eine ältere Version per Autostart-Icon starten ließen, "
  34.        "wird der Pfad vermutlich schon stimmen"
  35.   )
  36. )
  37.  
  38. (set #askdeveloper
  39.   (cat "Wenn Sie Applikationen für ITA1004Daemon programmieren möchten, "
  40.        "können Sie die dafür notwendigen Informationen umkopieren.\n\n"
  41.        "Möchten Sie die Entwicklerinfos installieren?"
  42.   )
  43. )
  44.  
  45. (set #askdeveloperdirmsg "Wo soll die Entwickler-Schublade angelegt werden?")
  46.  
  47. (set #askdeveloperdirhelp
  48.   (cat "Die Entwicklerinfos beinhalten Informationen zu ARexx-Port "
  49.        "und Exec-Messageport sowie Beispiele"
  50.   )
  51. )
  52.  
  53. (set #error_dtinstall1
  54.   (cat "\nAnscheinend haben Sie die falsche Schublade ausgewählt. "
  55.        "Starten Sie die Installation daher erneut.\n\n"
  56.        "Falls Sie 'ITA1004Config' noch nicht installiert haben, sollten Sie "
  57.        "dies jetzt nachholen"
  58.   )
  59. )
  60.  
  61. (set #error_dtinstall2
  62.   (cat "\nAnscheinend haben Sie das Programm 'ITA1004Config' noch "
  63.        "nicht konfiguriert (Prefs-Datei fehlt).\n\n"
  64.        "Starten Sie bitte erst ITA1004Config, setzen Sie die "
  65.        "Programmeinstellungen und speichern Sie diese. Danach "
  66.        "können Sie diese Installation erneut starten."
  67.   )
  68. )
  69.  
  70. (set #helpwbstartup
  71.   (cat "Da Sie ein Autostart-Icon installiert haben, ist es nicht "
  72.        "notwendig, daß Sie das Programm 'ITA1004Daemon' in der 'WBStartup' - Schublade "
  73.        "belassen. Entfernen Sie es bitte."
  74.   )
  75. )
  76.  
  77. (set #askwbstartup
  78.   (cat "Möchten Sie, daß 'ITA1004Daemon' bei jedem Rechnerstart "
  79.        "automatisch aktiviert wird ? \n\n"
  80.        "Wenn ja, wird im nächsten Schritt ein Projekt-Icon "
  81.        "in den \"WBStartup\"-Ordner Ihrer Boot-Disk kopiert\n\n"
  82.        "Wenn nein, bleibt ein eventuell vorhandenes Start-Icon erhalten."
  83.   )
  84. )
  85.  
  86. (set #aiconfail1
  87.   (cat "Es existiert keine 'WBStartup'-Schublade auf Ihrer SYS- "
  88.        "Partition. Wenn Sie 'ITA1004Daemon' bei jedem Rechnerstart "
  89.        "automatisch in Ihren Rechner laden möchten, wird diese unbedingt "
  90.        "benötigt.\n\nSoll eine Schublade erzeugt werden?"
  91.   )
  92. )
  93.  
  94. (set #aiconfail2
  95.   (cat "Leider existiert keine 'WBStartup'-Schublade auf Ihrer SYS- "
  96.        "Partition. Automatischer Programmstart ist daher leider nicht möglich."
  97.   )
  98. )
  99.  
  100. (set #askuserstartup
  101.   (cat "Möchten Sie einen Suchpfad zur Schublade 'ITA1004Config' anlegen? "
  102.        "Programme dieser Schublade können dann einfacher in einem "
  103.        "Shellfenster gestartet werden.\n\n"
  104.        "Soll die User-Startup erweitert werden?"
  105.   )
  106.  
  107. (set #nodaemon
  108.   (cat "Aus irgend einem Grund wurde das Programm \"ITA1004Daemon\" nicht "
  109.        "umkopiert. Wiederholen Sie bitte den Installationsvorgang"
  110.   )
  111. )
  112.  
  113. ; *************************************************************************
  114. ; Beginn der Installation
  115. ; *************************************************************************
  116.  
  117. (complete 0)
  118.  
  119. (welcome)
  120.  
  121. ; *************************************************************************
  122. ; ITA1004Config-Pfad ermitteln, falls Icon in SYS:WBStart vorhanden ist
  123. ; *************************************************************************
  124.  
  125. (if (exists (tackon #aicondest "ITA1004DaemonStart.info"))
  126.   (
  127.     (iconinfo (dest (tackon #aicondest "ITA1004DaemonStart"))
  128.               (getdefaulttool "testdir")
  129.     )
  130.     (set @default-dest (pathonly testdir))
  131.   )
  132. )
  133.  
  134. ; *************************************************************************
  135. ; Zielverzeichnis auswählen lassen
  136. ; *************************************************************************
  137.  
  138. (set #destname
  139.   (askdir
  140.     (prompt  #askprgdirmsg)
  141.     (help    #askprgdirhelp)
  142.     (default @default-dest)
  143.   )
  144. )
  145.  
  146. (if (= #destname "")
  147.   (
  148.     (abort "Fehler bei Auswahl!")
  149.   )
  150. )
  151.  
  152. (set #icon_toolentry (tackon #destname "ITA1004Daemon"))
  153. (set #dokdest (tackon #destname "Docs"))
  154.  
  155. ; *************************************************************************
  156. ; ITA1004Config-Installation prüfen
  157. ; *************************************************************************
  158.  
  159. (if (exists (tackon #destname "ITA1004Config.wizard") (noreq))
  160.   (
  161.     (if (not (exists (tackon #destname "ITAConfig.Prefs") (noreq)))
  162.       (abort #error_dtinstall2)
  163.     )
  164.   )
  165.   (
  166.     (abort #error_dtinstall1)
  167.   )
  168. )
  169.  
  170. (complete 5)
  171.  
  172. (set #iconsource #progssource)
  173.  
  174. (complete 10)
  175.  
  176.  
  177. ; *************************************************************************
  178. ; Falls vorhanden, alten ITA1004Daemon beenden
  179. ; *************************************************************************
  180.  
  181. (if (exists "ExitDaemon")
  182.   (
  183.     (run "ExitDaemon")
  184.     (if (exists "RAM:OldDaemon_Removed")
  185.       (
  186.         (message "Ihre aktive Version von ITA1004Daemon wurde soeben aus dem Speicher entfernt. Nach erfolgreicher Installation müssen Sie \"ITA1004Daemon\" neu starten.")
  187.         (delete "RAM:OldDaemon_Removed")
  188.       )
  189.     )
  190.   )
  191.   (
  192.     (message "Eine eventuell aktive Version von ITA1004Daemon müssen Sie zuerst beenden, bevor Sie weitermachen! Benutzen Sie dazu das Programm \"Exchange\" der Workbench.")
  193.   )
  194. )
  195.  
  196. ; *************************************************************************
  197. ; Kopieren der Programme
  198. ; *************************************************************************
  199.  
  200. (if (exists #progssource (noreq))
  201.   (
  202.     (copyfiles (prompt "Programme kopieren")
  203.                (source #progssource)
  204.                (dest #destname) 
  205.                (help "")
  206.                (pattern "#?")
  207.                (confirm "EXPERT")
  208.     )
  209.   )
  210. )
  211. (complete 40)
  212.  
  213. ; *************************************************************************
  214. ; Kopieren der Anleitungen
  215. ; *************************************************************************
  216.  
  217. (if (exists #doksource)
  218.   (
  219.     (copyfiles (prompt "Anleitungen kopieren")
  220.                (source #doksource)
  221.                (dest #dokdest) 
  222.                (infos)
  223.                (help "")
  224.                (all)
  225.                (confirm "EXPERT")
  226.     )
  227.   )
  228. )
  229. (complete 55)
  230.  
  231. ; *************************************************************************
  232. ; Installieren des Autostart-Icons
  233. ; *************************************************************************
  234.  
  235. (if (exists #aiconsource)
  236.   (
  237.    (if (not (exists #aicondest))
  238.     (if (askbool (prompt #aiconfail1) (help "") (default 0) (choices "Ja" "Nein"))
  239.       (makedir #aicondest (infos))
  240.     )
  241.    )
  242.    (if (exists #aicondest)
  243.     (
  244.       (if (exists #icon_toolentry)
  245.         (
  246.           (if ((askbool (prompt #askwbstartup) (help "") (default 0) (choices "Ja" "Nein")))
  247.             (
  248.               (copyfiles (prompt  "Icon kopieren") (source  #aiconsource) (dest    #aicondest) (newname (cat #aiconname ".info")))
  249.  
  250. ; *************************************************************************
  251. ; Default-Tool und Tooltypes (Zukunft) eintragen
  252. ; *************************************************************************
  253.  
  254.               (set #newaiconname (tackon #aicondest #aiconname))
  255.  
  256.               (if (exists (cat #newaiconname ".info"))
  257.                 (
  258.                   (Tooltype (dest #newaiconname) (Setdefaulttool #icon_toolentry))
  259.                   (if (exists "SYS:WBStartup/ITA1004Daemon")
  260.                     (message #helpwbstartup)
  261.                   )
  262.                 )
  263.               )
  264.             )
  265.           )
  266.         )
  267.       )
  268.     )
  269.     (
  270.       (message #aiconfail2)
  271.     )
  272.    )
  273.   )
  274. )
  275. (complete 70)
  276.  
  277. ; *************************************************************************
  278. ; Entwicklerinformationen kopieren
  279. ; *************************************************************************
  280.  
  281. (if (exists #developersource)
  282.   (
  283.     (if (askbool (prompt #askdeveloper) (help "") (default 0) (choices "Ja" "Nein"))
  284.       (
  285.         (set developerpath (askdir (prompt  #askdeveloperdirmsg)
  286.                                    (help    #askdeveloperdirhelp)
  287.                                    (default @default-dest)
  288.                       )
  289.         )
  290.         (if (<> developerpath "")
  291.           (
  292.             
  293.             (set developerdir (tackon developerpath "DD-Entwickler"))
  294.             (makedir developerdir (infos))
  295.             (copyfiles (prompt "Entwicklerinfos kopieren")
  296.                        (source #developersource)
  297.                        (dest developerdir)
  298.                        (infos)
  299.                        (all)
  300.                        (help "")
  301.                        (confirm "EXPERT")
  302.             )
  303.           )
  304.         )
  305.       )
  306.     )
  307.   )
  308. )
  309.  
  310. (complete 80)
  311.  
  312. ; *************************************************************************
  313. ; Suchpfad in User-Startup einbinden
  314. ; *************************************************************************
  315.  
  316. (if (askbool (prompt #askuserstartup) (help "") (default 0) (choices "Ja" "Nein"))
  317.   (
  318.     (set cmd (cat "Path "#destname" add"))
  319.     (startup "ITA1004Daemon-Tools" 
  320.              (prompt (cat "Zeile '" cmd "'in User-Startup einfügen"))
  321.              (command cmd)
  322.              (help "")
  323.     )
  324.   )
  325. )
  326.  
  327. (complete 90)
  328.  
  329.  
  330. ; *************************************************************************
  331. ; Aktuelles Verzeichnis setzen
  332. ; *************************************************************************
  333.  
  334. (if (exists (tackon #destname "ITA1004Daemon"))
  335.   (
  336.     (set @default-dest #destname)
  337.   )
  338.   (
  339.     (abort #nodaemon)
  340.     (set @default-dest "")
  341.   )
  342. )
  343.  
  344. ; *************************************************************************
  345. ; Falls vorhanden, einen LiesMich-Text anzeigen
  346. ; *************************************************************************
  347.  
  348. (if (exists #liesmichtext)
  349.   (run (cat "sys:utilities/Multiview " #liesmichtext))
  350. )
  351.  
  352.  
  353. (complete 100)
  354.  
  355. ; *************************************************************************
  356. ; Ende der Installation
  357. ; *************************************************************************
  358.  
  359.